// vite.config.ts
import { defineConfig, loadEnv } from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/vite@4.3.9_sass@1.62.1/node_modules/vite/dist/node/index.js";
import vue from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/@vitejs+plugin-vue@4.1.0_vite@4.3.9_vue@3.2.47/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import path from "path";
import { createSvgIconsPlugin } from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@4.3.9/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import Unocss from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/unocss@0.52.7_postcss@8.4.24_vite@4.3.9/node_modules/unocss/dist/vite.mjs";
import { presetUno, presetAttributify, presetIcons } from "file:///C:/Users/86182/Desktop/work/%E5%B9%BF%E5%AE%89/guangan_front/guangan/node_modules/.pnpm/unocss@0.52.7_postcss@8.4.24_vite@4.3.9/node_modules/unocss/dist/index.mjs";
var vite_config_default = defineConfig(({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      Unocss({
        // 使用Unocss
        presets: [presetUno(), presetAttributify(), presetIcons()]
      }),
      createSvgIconsPlugin({
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        symbolId: "icon-[dir]-[name]"
      })
    ],
    resolve: {
      alias: {
        "@": path.resolve("./src")
        // 相对路径别名配置，使用 @ 代替 src
      }
    },
    // scss全局变量的配置
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      }
    },
    build: {
      outDir: "guangan_dist",
      //指定输出路径
      assetsDir: "assets"
      // 指定生成静态资源的存放路径
    },
    //代理跨域
    server: {
      host: "0.0.0.0",
      publicPath: process.env.NODE_ENV === "production" ? "./" : "/",
      proxy: {
        [env.VITE_APP_BASE_API]: {
          //获取数据的服务器地址设置
          target: env.VITE_SERVE,
          //需要代理跨域
          changeOrigin: true,
          logLevel: "debug"
          //路径重写
          // rewrite: (path) => path.replace(/^\/api/, ''),
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJDOlxcXFxVc2Vyc1xcXFw4NjE4MlxcXFxEZXNrdG9wXFxcXHdvcmtcXFxcXHU1RTdGXHU1Qjg5XFxcXGd1YW5nYW5fZnJvbnRcXFxcZ3VhbmdhblwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiQzpcXFxcVXNlcnNcXFxcODYxODJcXFxcRGVza3RvcFxcXFx3b3JrXFxcXFx1NUU3Rlx1NUI4OVxcXFxndWFuZ2FuX2Zyb250XFxcXGd1YW5nYW5cXFxcdml0ZS5jb25maWcudHNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0M6L1VzZXJzLzg2MTgyL0Rlc2t0b3Avd29yay8lRTUlQjklQkYlRTUlQUUlODkvZ3Vhbmdhbl9mcm9udC9ndWFuZ2FuL3ZpdGUuY29uZmlnLnRzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnLCBsb2FkRW52IH0gZnJvbSAndml0ZSdcbmltcG9ydCB2dWUgZnJvbSAnQHZpdGVqcy9wbHVnaW4tdnVlJ1xuaW1wb3J0IHBhdGggZnJvbSAncGF0aCdcblxuLy8gXHU1RjE1XHU1MTY1c3ZnXHU5NzAwXH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